Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dlsyminPlayLoader.m(pt_dlsym) sodlsym(RTLD_DEFAULT, "gl...")lookups check an already-loadedOpenGLES.framework(RTLD_NOLOAD) before falling through to the default lookup.Why
On macOS (Catalyst), apps and games that resolve OpenGL ES entry points dynamically via
dlsym(RTLD_DEFAULT, "gl...")(such asglGetString) can accidentally resolve symbols from macOS'slibGL.dylibinstead of iOS Support'sOpenGLES.framework. CallinglibGL.dylib'sglGetStringwithout a macOS CGL context crashes on launch (EXC_BAD_ACCESS/ null pointer dereference).Because
pt_dlsymusesRTLD_LAZY | RTLD_NOLOAD, it only redirectsgl*symbols onceOpenGLES.frameworkis already loaded in the process and falls back todlsym(handle, symbol)for everything else.Testing & Known Limitations
PlayTools(Release,generic/platform=iOS, converted tomaccatalyst 11.0 14.0viavtool) and tested with an OpenGL ES iOS game (com.miniclip.8ballpoolmult56.36.1) that previously crashed immediately on launch inlibGL.dylibglGetString.libGL.dylibcrash, initializesOpenGLES2, compiles/links shaders, and opens its window.libloader.framework) are still unable to stay open because they detect the re-signed Catalyst/PlayCover environment and exit voluntarily shortly after launch. This PR only addresses theOpenGLESvslibGL.dylibsymbol-shadowing crash and does not bypass application security or anti-tamper checks.